<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateDevicesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('devices', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('apply_id')->nullable();
			$table->string('comment')->nullable();
			$table->integer('device_id')->nullable();
			$table->integer('major')->nullable();
			$table->integer('minor')->nullable();
			$table->smallInteger('status')->nullable();
			$table->string('last_active_time')->nullable();
			$table->integer('poi_id')->nullable();
			$table->string('uuid')->nullable();
			$table->timestamps();
			$table->integer('page_id')->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('devices');
	}

}
